<!DOCTYPE html>


<html class="ty_tae">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta http-equiv="pragma" content="no-cache" />
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="0">
<meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1,minimum-scale=1, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<link rel="stylesheet" type="text/css" href="static/css/normalize.css">
<link rel="stylesheet" type="text/css" href="static/css/HdWater2.css">
<script src="static/js/zepto.min.js"></script>
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>

<script type="text/javascript">
//注册键盘事件
document.onkeydown = function(e) {
    //捕捉回车事件
	var ev = (typeof event!= 'undefined') ? window.event : e;
	if(ev.keyCode == 13) {
		event.keyCode=0;
		return   false;
	}
}
</script>

 <script type="text/javascript">
    // 对浏览器的UserAgent进行正则匹配，不含有微信独有标识的则为其他浏览器
    var useragent = navigator.userAgent;
    if (useragent.match(/MicroMessenger/i) != "MicroMessenger") {
        // 这里警告框会阻塞当前页面继续加载
        alert("已禁止本次访问：您必须使用微信内置浏览器访问本页面！");
        // 以下代码是用javascript强行关闭当前页面
        var opened = window.open("about:blank", "_self");
        opened.opener = null;
        opened.close();
    }
</script>





<script language="javascript">

$(function(){ 



$('#chick').bind('click',function(){
 if ($('#name').val()==""){
  alert("请输入您获得的PIN码");
window.location.replace("index.html");
  }

    $.ajax({
  url:"action.php",
  type:"post",
  data:{name:$("#name").val()},
  dataType:"text",
  async:false, 
  success: function(data){
 //alert(data);
	var data1=eval("("+data+")");
	//alert(data1);
   if(data1[1] == 1){
  // alert("未中奖");
	window.location.replace("sorry.php");
	}
	var strHTML="";
	strHTML+="<section class='container clearfix'><img class='full' src='static/images/HengDaWater2/"+data1[0]+".jpg'><div class='cont'>";
	strHTML+="<div class='rows' style='overflow:hidden;height:53%'></div><div class='rows lottery-rows' style='width:80%'>";
	strHTML+="<div><p width='80%' align='left'><font color='#FFFFFF'>您的PIN码："+data1[1]+"</font></p> ";
	strHTML+=" <p width='80%' align='left'><font color='#FFFFFF'>恭喜您获得恒大冰泉派发给您的圣诞礼物："+data1[2]+"一"+data1[3]+"。<br/>冰泉君在此祝您圣诞快乐。</font></p> </div> </div></div></section>";
	//alert(strHTML)
	$('#rel').html(strHTML);
  },
   
});
  $('#index').hide();
  $('#rel').show();
  });
 
});

</script>

<title>恒大冰泉</title>


</head>
<body>
<div id="rel">

</div>
<div id= "index">
<section class="container clearfix" id="index">


    <img class="full" src="static/images/HengDaWater2/bg.jpg">
	
      <form id="ajaxform" name="ajaxform" method="post" action="action.php">
	   
        <div class="cont">
		
            <div class="rows" style="overflow:hidden;height:63%">
                <div class="form-control clearfix" style="margin-top:83%">
                    <input style="width:96%;float:left"  id="name" name="name" type="text"  placeholder="请输入您获得的PIN码"/ >  
                </div> 
           </div>
		   
           <div class="rows lottery-rows" style="width:47%">
                <img src="static/images/HengDaWater2/icon/button.png">
                <button type="button" name="Submit" style="height:78%;color:#fff;font-size:18px" id="chick"></button>
				
          </div>
<p id="msg"></p>
        </div>
        </form>


</section>
</div>
<script language="javascript">
$(function(){  
    $('#index').show();
    $('#rel').hide();	
});  

</script>
</body>
</html>
